<?php require("inc/common.inc.php");
$web_title="铭讯免费WIFI";
$changsuoarr=array("1"=>"小型场所（100平）","2"=>"中型场所（500平）","5"=>"大型场所（500平以上）");
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
if ($actions=="setsl"){
	$changsuo=intval($changsuo);
	$mobile=trim($mobile);
//	if($changsuo==0){
//		$fun->popmassage("请选择场所类型","","popback");
//		exit();
//	}
//	if (!array_key_exists($changsuo,$changsuoarr)){
//		$fun->popmassage("请正确选择场所类型","","popback");
//		exit();
//	}
	if($mobile==""){
		$fun->popmassage("请填写手机号","","popback");
		exit();
	}else{
		if(!eregi("^[0-9]{11,11}$",$mobile)){
		$fun->popmassage("手机号格式错误","","popback");
		exit();
		}
	}
  
	$files=array(
        "changsuo"    =>$changsuo,
        "mobile"      =>$mobile,
        "adddate"     =>date("Y-m-d H:i:s"),
	);
	$db->exe_insert("mx_vpp_getwifi",$files);
	$fun->popmassage("铭讯免费WIFI申请已经提交成功，我们会尽快与您取得联系","","popgotourl");
	exit();
}
?>
<meta content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1" name="viewport">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><?php echo $web_title;?></title>
<meta name="searchtitle" content="<?php echo $web_title2.$webdb['metakeywords'];?>">
<meta name="description" content="<?php echo $web_title2.$webdb['webdsc'];?>">
<meta name="keywords" content="<?php echo $web_title2.$webdb['metakeywords'];?>">
<link href="images/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="images/message.css" media="all" />
</head>
<style type="text/css">
body{padding:0px;margin:0px; background-color:#FFFFFF;}
img{border:0px;}
.sub{width:100%;margin:0 auto;position:relative;}
.sub img{width:100%;}
.bottom123{width:100%;/*position:fixed;bottom:0px;*/}
.input123{padding:0px;margin:0px;width:100%;height:40px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;border:#ccc 1px solid; 
          /*box  x阴影  y阴影  10羽化  阴影颜色  */
box-shadow: 0px 0px 5px #ccc inset;/* inset 向内阴影 */}
.input1231{padding:0px;margin:0px;width:80%;height:40px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;border:#ccc 1px solid; 
          /*box  x阴影  y阴影  10羽化  阴影颜色  */
box-shadow: 0px 0px 5px #ccc inset;/* inset 向内阴影 */}

.input234{width:100%;background:url(images/an.jpg) 0 0 repeat-x;height:40px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px; color:#FFFFFF; line-height:40px; text-align:center;}
.input234 input{ background:url(images/an.jpg) 0 0 repeat-x;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px; border:0px;color:#fff;line-height:40px; text-align:center;width:100%;height:40px;overflow:hidden;display:block;font-size:12px; text-decoration:none; font-weight:bold;}

</style>
<body>
<?php
$head_hide=1;
require("w_head.php");
?>
<div class="sub"><a href="tel:4006631233"><img src="images/bg.png" ></a></div>
<div class="bottom123">
<form  name="form1" id="form1" action="getwifi.php" method="post" onSubmit="return check_form1()">
  <table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" style="margin-top:15px;">
    <!--<tr>
      <td height="45"><select name="changsuo" id="changsuo">
	  <option value="">选择场所类型</option>
	  <?php //echo show_select($changsuoarr);?>
	  </select></td>
    </tr>-->
    <tr>
      <td height="45"><input name="mobile" id="mobile" type="text" class="input123" placeholder="手机号码"><input type="hidden" name="actions" value="setsl"></td>
    </tr>
	<tr><td height="45"><div class="input234"><input type="submit" name="sub" value="马上申领"></div></td></tr>
  </table>
</form>

<script>
function check_form1(){
//	if (document.form1.changsuo.value==""){
//		alert("请选择场所类型");
//		document.form1.changsuo.focus();
//		return false;
//	}
	if (document.form1.mobile.value==""){
		alert("手机号码不能为空");
		document.form1.mobile.focus();
		return false;
	}else{
	 	var input = document.form1.mobile.value;
	 	regExp = /^[0-9]{11,11}$/ ;
	 	if (!regExp.test (input) )
	 	{
			alert('手机号码格式错误');
			document.form1.mobile.focus();
			return false;
	 	}
	}
}
</script>
</div>
<script type="text/javascript">
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        window.shareData = {  
           "imgUrl": "<?php echo get_photourl("/images/bg.png");?>", 
            "timeLineLink": "<?php echo $webdb["weburl"]."/getwifi.php";?>",
            "sendFriendLink": "<?php echo $webdb["weburl"]."/getwifi.php";?>",
            "weiboLink": "<?php echo $webdb["weburl"]."/getwifi.php";?>",
            "tTitle": "<?php echo $web_title?>",
            "tContent": "移动互联网到来了，您还在微营销发愁吗？wifi管家全部帮你解决，有效提高店面形象，牢牢锁住客户，马上联系我吧！0531-88707070",
            "fTitle": "<?php echo $web_title?>",
            "fContent": "移动互联网到来了，您还在微营销发愁吗？wifi管家全部帮你解决，有效提高店面形象，牢牢锁住客户，马上联系我吧！0531-88707070",
            "wContent": "移动互联网到来了，您还在微营销发愁吗？wifi管家全部帮你解决，有效提高店面形象，牢牢锁住客户，马上联系我吧！0531-88707070" 
        };
        // 发送给好友
        WeixinJSBridge.on('menu:share:appmessage', function (argv) {
            WeixinJSBridge.invoke('sendAppMessage', { 
                "img_url": window.shareData.imgUrl,
                "img_width": "640",
                "img_height": "640",
                "link": window.shareData.sendFriendLink,
                "desc": window.shareData.fContent,
                "title": window.shareData.fTitle
            }, function (res) {
                _report('send_msg', res.err_msg);
            })
        });

        // 分享到朋友圈
        WeixinJSBridge.on('menu:share:timeline', function (argv) {
            WeixinJSBridge.invoke('shareTimeline', {
                "img_url": window.shareData.imgUrl,
                "img_width": "640",
                "img_height": "640",
                "link": window.shareData.timeLineLink,
                "desc": window.shareData.tContent,
                "title": window.shareData.tTitle
            }, function (res) {
                _report('timeline', res.err_msg);
            });
        });

        // 分享到微博
        WeixinJSBridge.on('menu:share:weibo', function (argv) {
            WeixinJSBridge.invoke('shareWeibo', {
                "content": window.shareData.wContent,
                "url": window.shareData.weiboLink,
            }, function (res) {
                _report('weibo', res.err_msg);
            });
        });
        }, false)
</script>
<div style="display:none"><script language="javascript" src="http://count35.51yes.com/click.aspx?id=358390026&logo=1" charset="gb2312"></script></div>
</body>
</html>